import { Card } from "antd";

const CardSum = ({ childComponent, type, value }) => {
  return (
    <>
      <Card style={{ width: 300 }}>
        <div
          style={{
            display: "flex",
            justifyContent: "space-between",
            alignItems: "center",
            marginBottom: 10,
          }}
        >
          <span style={{ fontWeight: "bold" }}>{type}</span>
          <span>{childComponent}</span>
        </div>
        <div>
          <span style={{ fontSize: 28, fontWeight: "bold" }}>{value}</span>
        </div>
      </Card>
    </>
  );
};

export default CardSum;
